let excelButton = $("#excelButton");
let java8dateButton = $("#java8date");
let useLayuiButton = $("#useLayui");
let thymeleafButton = $("#thymeleaf");
let customModuleButton = $("#customModule");
let jquerySelectorButton = $("#jquerySelector");
let elementButton = $("#element");
let jqueryEventButton = $("#jqueryEvent");
let cssButton = $("#cssButton");
let importPubButton = $("#importPub");
let cssSelectorButton = $("#cssSelector");
let formButton = $("#formButton");
let elementWeightButton = $("#elementWeight");
let fontAndTextButton = $("#fontAndText");
let layoutButton = $("#layout");
let jqueryLoadButton = $("#jqueryLoad");
let objToJsButton = $("#objToJs");
let floatCssButton = $("#floatCss");
let positionButton = $("#position");
let formValidButton = $("#formValid");
let ajaxLoadingButton = $("#ajaxLoading");
let tableOptionalButton = $("#tableOptional");
let restfulButton = $("#restful");
let videoEncryptionButton = $("#videoEncryption");
let wangEditorButton = $("#wangEditor");
let zTree1Button = $("#zTree1");
let taginputButton = $("#taginput");
let modalPlugButton = $("#modalPlug");
let flexButton = $("#flex");
let flex2Button = $("#flex2");
let layerBtn = $("#layerBtn");
let onlineDrawingFlowChartBtn = $("#onlineDrawingFlowChart");
let textFlowChartBtn = $("#textFlowChart");
let vueLifeCycleBtn = $("#vueLifeCycle");

function buttonInit() {
    excelButton.on("click", function () {
        window.location.href = "/excel/excel";
    });

    java8dateButton.on("click", function () {
        window.location.href = "/data/userJava8date";
    });

    useLayuiButton.on("click", () => {
        window.location.href = "/layui/layuiStart";
    });

    thymeleafButton.on("click", () => {
        window.location.href = "/thymeleaf/th";
    });

    customModuleButton.on("click", () => {
        window.location.href = "/layui/customModule";
    });

    jquerySelectorButton.on("click", () => {
        window.location.href = "/jquery/selector";
    });

    elementButton.on("click", () => {
        window.location.href = "/layui/pageElement";
    });

    jqueryEventButton.on("click", function () {
        window.location.href = "/jquery/event";
    });

    cssButton.on("click", function () {
        window.location.href = "/css/demo";
    });

    importPubButton.on("click", function () {
        window.location.href = "/css/import";
    });

    cssSelectorButton.on("click", function () {
        window.location.href = "/css/selector";
    });

    formButton.on("click", function () {
        window.location.href = "/css/formStyle";
    });

    elementWeightButton.on("click", function () {
        window.location.href = "/css/elementWeight";
    });

    fontAndTextButton.on("click", function () {
        window.location.href = "/css/fontAndText";
    });

    layoutButton.on("click", function () {
        window.location.href = "/css/layoutPage";
    });

    jqueryLoadButton.on("click", function () {
        window.location.href = "/jquery/load";
    });

    objToJsButton.on("click", function () {
        window.location.href = "/thymeleaf/objectToJs";
    });

    floatCssButton.on("click", function () {
        window.location.href = "/css/floatDemo";
    });

    positionButton.on("click", function () {
        window.location.href = "/css/position";
    });

    formValidButton.on("click", function () {
        window.location.href = "/jquery/formValidation";
    });

    ajaxLoadingButton.on("click", function () {
        window.location.href = "/jquery/ajaxLoading";
    });

    tableOptionalButton.on("click", function () {
        window.location.href = "/css/tableOptional";
    });

    restfulButton.on("click", function () {
        window.location.href = "/jquery/restful";
    });

    videoEncryptionButton.on("click", function () {
        window.location.href = "/page/vedio";
    });

    wangEditorButton.on("click", function () {
        window.location.href = "/page/plugin/wangEditorDemo";
    });

    zTree1Button.on("click", function () {
        window.location.href = "/page/plugin/zTreeDemo1";
    });

    taginputButton.on("click", function () {
        window.location.href = "/jquery/taginputDemo";
    });

    modalPlugButton.on("click", function () {
        window.location.href = "/jquery/modal/RemodalDemo";
    });

    flexButton.on("click", function () {
        window.location.href = "/css/flex/propertyDescription";
    });

    flex2Button.on("click", function () {
        window.location.href = "/css/flex/simpleLayoutDemo";
    });

    layerBtn.on("click", function () {
        window.location.href = "/layui/button/layerEvent";
    });

    onlineDrawingFlowChartBtn.on("click", function () {
        window.location.href = "https://www.processon.com/diagrams";
    });

    textFlowChartBtn.on("click", function () {
        window.location.href = "http://asciiflow.com/";
    });

    vueLifeCycleBtn.on("click", function () {
        window.location.href = "/vue/lifeCycle";
    });

}

$(function () {
    buttonInit();
});